-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log4j configuration issue #449
Comments
I cannot reproduce. These lines are not printed for me. It looks as if the log4j.properties file is not loaded properly, or maybe there is no appender for org.apache.* in your file. Can you attach your full log4j.properties? What if you hardcode the path to the log4j file in the collector-http.sh script? Does it make a difference? Logging will be reworked at some point in a future release to give more flexibility to people integrating the Collector in their own solution. It may help with such issues as well. This can be tracked in #401 and Norconex/jef#6. |
Hardcoding the path in the script had no change. If I set the path to something non-existent, I get this:
Here is my complete
|
Sorry I still can't reproduce. I am afraid you'll have to live with that warning until the logging mechanism changes. One last idea: try to move the log4j.properties files under the "classes" folder (which is part of the class loader when you use the launch script). |
Hi can i prevent creating one big output logger file it seems when added the file property its not creating multiple log files, Can some one please provide configuration if they did it already? Also I need to change the name of file.? |
To reduce the log size, you can change the log levels in the log4j.properties. The log file is backed up automatically at the beginning of next run. The next major version (3.x) will give you more flexibility with logging (relying on SLF4J). Until then, I would recommend you modify the launch script to modify the file(s) as you want between runs. |
You can now rely 100% on your own log4j configuration with the latest snapshot release. Have a look at: #593 (comment) to find out how. |
this helps for collector 2.9:
|
Apologies for commenting on a closed issue earlier.
If I try changing the line in
log4j.properties
tolog4j.rootLogger=INFO, FILE_ONLY
and run the command from the command line, the Collector doesn't output any logs to the terminal, but I still get this warning:This is quite strange, because clearly the properties file is being read properly, as the configuration change is taking effect (no output to terminal).
Of course I could also send stderr to /dev/null from my cronjob, but being able to receive errors and warnings by mail would be nice. Assuming warnings and errors other than this log4j issue are printed to stderr and further mailed along by cron, that is.
The text was updated successfully, but these errors were encountered: