Log4j Maximum String Length OR Java String Concatenation Error? -


Running on Solaris 10, when I press an LOG.debug statement using an Apache log 4j logger. The original scenario is displayed in the following code block:

  public class MyClass {Personal Static Last Logger LOG = Logger.getLogger (MyClass.class.getName ()); Private LinkedHash & lt; String, string & gt; MyMap = New LinkedHash & lt; String, string & gt; (); Public static zero main (string [] args) {// a very long string, but definitely not more than 2 ^ 31 - 1 character / string / string in fact actually string = "actually, in fact, really .. Tall string "; String key = "kettle long string"; // When this line is executed, Solaris logs me instantly and completely / the system is adding LOG.debug ("MyMap [" + key + "]:" + really long string); }}  

Any ideas?

If you have any type of process boundaries, you may be running in that string consensation By, you will use at least (reallyLongString.length () + key.length ()) * 2 bytes. If your limitations are enough to push you ...


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -