-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from NASA-PDS/i61
Template now includes an example `log4j.properites` files
- Loading branch information
Showing
3 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Example log4j.properties | ||
# ======================== | ||
# | ||
# This is an example `log4j.properties` file that serves as a starting point | ||
# for your own application. It sets up the following: | ||
# | ||
# - Default log level is `WARN`, which is reasonable | ||
# - Default logging is to the standard error output (`stderr`), which is | ||
# what you want¹ | ||
# | ||
# The possible log levels are (listed in priority level): | ||
# | ||
# - `FATAL`: the most severe; the application will abort | ||
# - `ERROR`: a significant problem that requires attention | ||
# - `WARN`: potentially harmful and worth noting but not necessarily a failure | ||
# - `INFO`: general information about app progress | ||
# - `DEBUG`: detailed info useful for developers | ||
# - `TRACE`: even more detail than `DEBUG` | ||
# | ||
# There are special levels `OFF` and `ALL` which do what you expect. | ||
# | ||
# There is an additional appender commented-out below; feel free to enable it | ||
# and/or customize it. | ||
# | ||
# Below that are examples showing how to fine-tune the log levels per-package. | ||
|
||
|
||
log4j.rootCategory=WARN, console | ||
|
||
|
||
# Console Logging | ||
# --------------- | ||
|
||
log4j.appender.console = org.apache.log4j.ConsoleAppender | ||
log4j.appender.console.layout = org.apache.log4j.PatternLayout | ||
log4j.appender.console.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} [%-5p] (%F:%M:%L) %m%n | ||
|
||
|
||
# Example Rolling File Logging | ||
# ---------------------------- | ||
# | ||
# This logs to a file named `logs/app.log.2024-01-01`, etc., making a new file | ||
# each day. If you comment this out, add `, rolling` to the `log4j.rootCategory` | ||
# or to a package-specific declaration. | ||
# | ||
# log4j.appender.rolling = org.apache.log4j.DailyRollingFileAppender | ||
# log4j.appender.rolling.File = logs/app.log | ||
# log4j.appender.rolling.Append = true | ||
# log4j.appender.rolling.DatePattern = '.'yyyy-MM-dd | ||
# log4j.appender.rolling.layout = org.apache.log4j.PatternLayout | ||
# log4j.appender.rolling.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} [%-5p] (%F:%M:%L) %m%n | ||
|
||
|
||
# Example Package-Level Directives | ||
# -------------------------------- | ||
# | ||
# These show examples of how to on `DEBUG` logging for one module (up from the | ||
# default of `WARN`) for the `gov.nasa.pds.xml.utils` package and completely | ||
# turn off logging for all packages/sub-packages under `com.nickelback`: | ||
# | ||
# log4j.logger.gov.nasa.pds.xml.utils = DEBUG | ||
# log4j.logger.com.nickelback = OFF |