Hi Stephan,

please see inline

On Wed, Apr 20, 2011 at 12:58 AM, Stephan Hagemann
<stephan.hagem...@googlemail.com> wrote:
> Hi Mattias, hi List,
>
> I am running this on Linux... and I solved the problem (with a workaround).
>
> What confused me the whole time was that there were three files for the same
> purpose in the conf directory: log4j.properties, logback.xml,
> logging.properties (the first two aren't used - I am using 1.3 advanced -
> could they go away?). To make matters worse, even neo4j-wrapper.conf has
> some logging related settings. And then there are 'settings' in the neo4j
> executable about whether the startup should wait for success messages from
> the server.

The 3 files that pertain to the logging frameworks have not been
removed since there are lingering libraries that could use them -
log4j is a hard requirement for zookeeper and some dependencies of the
wrapper, for instance. This doesn't mean that they are necessary, it
means we are in the process of fixing this.

The neo4j-wrapper.conf does indeed contain a logging settings section,
since it prefers to do the logging setup on its own.
The reason things seem complicated is that YAJSW pipes stdout/stderr
of the wrapped process into itself and everything that is received
from there is printed to the console. This means that the actual
control of what is logged from the neo4j server (at the latest
snapshots) is the logging.properties file in the usual j.u.l manner -
the neo4j-wrapper.conf logging settings control the logging for the
wrapper *only*, with the exception of the log statement format.

> I am pretty sure this line from logging.properties wasn't there in 1.3.M5,
> because I didn't have a whole lot of console logging before:
>  handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler

This is because we want, by default, some interesting messages, such
as the server URI and the webadmin location to be printed to the
console during startup. Essentially, we have set the console handler
to print statements of INFO level or greater. Removing the Console
handler will completely stop the logging from neo4j-server, but the
wrapper will continue outputting its statements.

> When I switched it to
>  handlers=java.util.logging.FileHandler
> most of the logging ouput in the console went away, but the process for some
> reason still held on to the console. E.g., when I do a 'neo4j dump' the
> result is shown in the original console. I have not yet been able to find
> out, where I can make the server fully detach.
>
> The workaround for me is to explicitly pipe the neo4j command's output to a
> file.

This is actually a common behavioral pattern in all *nix applications
- holding on to the pts it was started at. It can be annoying though,
so at some point it may have to be fixed.
Finally, the same applies to "not getting back to the prompt". The
shell script returns as soon as the neo4j-server process is forked,
but there is still some log statements to be written. This clutters up
the screen, as output from any background process does, making it seem
like the prompt isn't there. If you just press enter, you will get it
back. As a workaround, you can increase the WAIT_AFTER_STARTUP
variable in the neo4j script (measured in seconds, set to 5 at the
latest SNAPSHOT) making sure this way that there remains no more
output that could clutter up your console.

> Cheers
> Stephan

Hope the above clarify things. Again, check out the latest builds,
most of this stuff is fixed/made sane.

cheers,
CG

>
> PS: here is my logging.properties:
>
> # Global logging properties.
> # ------------------------------------------
> # The set of handlers to be loaded upon startup.
> # Comma-separated list of class names.
> # (? LogManager docs say no comma here, but JDK example has comma.)
> handlers=java.util.logging.FileHandler
>
> # Default global logging level.
> # Loggers and Handlers may override this level
> .level=INFO
>
> # Loggers
> # ------------------------------------------
> # Loggers are usually attached to packages.
> # Here, the level for each package is specified.
> # The global level is used by default, so levels
> # specified here simply act as an override.
> org.neo4j.server.level=INFO
>
> # Handlers
> # -----------------------------------------
>
> # --- ConsoleHandler ---
> # Override of global logging level
> java.util.logging.ConsoleHandler.level=INFO
> java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
> java.util.logging.ConsoleHandler.filter=org.neo4j.server.logging.NeoLogFilter
>
> # --- FileHandler ---
> # Override of global logging level
> java.util.logging.FileHandler.level=ALL
>
> # Naming style for the output file:
> # (The output file is placed in the directory
> # defined by the "user.home" System property.)
> java.util.logging.FileHandler.pattern=data/log/neo4j.%u.log
>
> # Limiting size of output file in bytes:
> java.util.logging.FileHandler.limit=50000
>
> # Number of output files to cycle through, by appending an
> # integer to the base file name:
> java.util.logging.FileHandler.count=1
>
> # Style of output (Simple or XML):
> java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
>
>
>
>
> On Tue, Apr 19, 2011 at 03:13, Mattias Persson 
> <matt...@neotechnology.com>wrote:
>
>> Are you running this on Windows? Because that's the expected behaviour
>> on that OS. What you really want to do is to install the service and
>> then you can start/stop it as you'd expect. Try
>>
>>   bin\Neo4j install
>>
>> and then you can do
>>
>>   bin\Neo4j start
>>
>> 2011/4/19 Stephan Hagemann <stephan.hagem...@googlemail.com>:
>> > Hello group,
>> >
>> > I just realized that since upgrading to Neo4j 1.3 my deployment is
>> broken.
>> > It seems to be due to the fact that when starting up, the server does not
>> > return to a prompt (I noticed this locally also - I need to press enter
>> to
>> > get the prompt). Vlad (the deployment script) thus probably assumes that
>> the
>> > startup is not yet finished. I have played with the startup options in
>> the
>> > neo4j executable, but to no avail. Is anyone else experiencing this or
>> has
>> > some ideas?
>> >
>> > Thanks!
>> > Stephan
>> > _______________________________________________
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> >
>>
>>
>>
>> --
>> Mattias Persson, [matt...@neotechnology.com]
>> Hacker, Neo Technology
>> www.neotechnology.com
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to