forked from cram2/pycram
-
Notifications
You must be signed in to change notification settings - Fork 3
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 cram2#225 from AbdelrhmanBassiouny/log_level
[LoggingLevel] Adding setting log level.
- Loading branch information
Showing
3 changed files
with
67 additions
and
7 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,14 @@ | ||
from bullet_world_testcase import BulletWorldTestCase | ||
from pycram.ros.logging import set_logger_level, logwarn, logerr | ||
from pycram.datastructures.enums import LoggerLevel | ||
|
||
|
||
class TestLogging(BulletWorldTestCase): | ||
"""Testcase for the pycram logging functions.""" | ||
|
||
def test_set_logger_level(self): | ||
logwarn("This is a warning, it should not be printed") | ||
logerr("This is an error, it should be printed") | ||
set_logger_level(LoggerLevel.ERROR) | ||
logwarn("This is a warning, it should not be printed") | ||
logerr("This is an error, it should be printed") |