java - How can I store log into a file via GridLogger? -
currently can print out logs in console via gridlogger, wondering how can store logs file via gridlogger. in gridgain conf directory, there 2 files: gridgain-log4j.xml , java.util.logging.properties. how can load these files in application?
thanks, bill
gridgain writes log file default (and additionally console if verbose mode enabled). if haven't done changes configuration, log files stored in $gridgain_home/work/log
folder. note when nodes started using ggstart.{sh|bat}
script, $gridgain_home
automatically resolved gridgain distribution root directory if it's not set via system property or environment variable.
in case $gridgain_home
unknown (e.g., you're running node in embedded mode inside web container), log files stored in $tmp_dir/gridgain/work/log
folder, $tmp_dir
temporary directory in os. can override behavior via gridconfiguration.setworkdirectory()
configuration property. work directory provided here used different gridgain components including logger, create log
subfolder log files.
there option manually configure 1 of gridlogger
implementations available out of box, or provide own. gridlogger
instance can set via gridconfiguration.setlogger()
property.
by default gridgain uses java logger configured java.util.logging.properties
file included in distribution. if want switch log4j, need enable gridgain-log4j
module - logger changed automatically , configured gridgain-log4j.xml
. more information on how enable/disable modules refer readme.txt
file located in libs
folder of gridgain distribution.
Comments
Post a Comment