Skip to content

Commit

Permalink
Merge pull request #7 from metasfresh/FRESH-267
Browse files Browse the repository at this point in the history
FRESH-267 aparently Loglevels are changed somewhere in the code
  • Loading branch information
teosarca committed May 4, 2016
2 parents 5f8dc31 + 95a5103 commit 9f68673
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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

0 comments on commit 9f68673

Please sign in to comment.