Created
September 19, 2014 17:05
-
-
Save munificent/01a31d429235c448aa87 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
library logger; | |
import 'verbose.dart'; | |
import 'plain.dart'; | |
log(message) { | |
print(const String.fromEnvironment("logger.level")); | |
if (const String.fromEnvironment("logger.level") == "verbose") { | |
logVerbose(message); | |
} else { | |
logPlain(message); | |
} | |
} |
This file contains hidden or 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
import 'logger.dart'; | |
main() { | |
log("Hi"); | |
} |
This file contains hidden or 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
logPlain(message) { | |
print("Plain $message"); | |
} |
This file contains hidden or 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
logVerbose(message) { | |
print("Verbose $message"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment