Skip to content
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

FRESH-267 aparently Loglevels are changed somewhere in the code #7

Merged
merged 1 commit into from
May 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The actual release notes
* adding a simple DB function to do the job for now

## Fixes
- FRESH-267 aparently Loglevels are changed somewhere in the code
- FRESH-270 material tracking: total received qty and scrap sometimes missing on invoice
* fixed a problem where those two invoice detail records were attached to a not-displayed group
- FRESH-234 report sales inout qtys for products and TUs are not alligned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ public static void initialize(final boolean isClient)
SLF4JBridgeHandler.install();
}

setLevel(Level.INFO);
if (isClient)
{
// FRESH-267: in server mode, do not (re)set the loglevels. They are coming out of logback.xml and/or application properties and were probably fine-tuned.
// resetting them to info might cause the disk to run full.
setLevel(Level.INFO);
}
}

private static final AtomicBoolean s_initialized = new AtomicBoolean(false);
Expand Down Expand Up @@ -236,7 +241,9 @@ private static void setJDBCDebug(final boolean enable)
}
} // setJDBCDebug

/** @return current log level or <code>null</code> if not initialized */
/**
* @return current log level or <code>null</code> if not initialized
*/
public static final Level getLevel()
{
return s_currentLevel;
Expand All @@ -254,13 +261,13 @@ public static boolean isLevel(final Level level)
{
return false;
}

final Level currentLevel = getLevel();
if (currentLevel == null)
{
return false;
}

return level.toInt() >= currentLevel.toInt();
} // isLevel

Expand Down