Last active
December 10, 2015 17:08
-
-
Save sys1yagi/4465481 to your computer and use it in GitHub Desktop.
use logger. Implementation of logger based on adapter pattern in the Typescript https://gist.github.com/4465396
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
<html> | |
<head> | |
<script type="text/javascript" src="dp.js"></script> | |
<script type="text/javascript"> | |
var logger; | |
window.onload = function(){ | |
logger = LogAdapterFactory.createLogger(LOGGER_TYPE.DISPLAY); | |
logger.log("output log"); | |
} | |
</script> | |
</head> | |
<body> | |
<input type="text" value="write log here." id="log" /> | |
<input type="button" value="出力" onclick="logger.log(document.getElementById('log').value)" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment