Skip to content

Instantly share code, notes, and snippets.

@sys1yagi
Last active December 10, 2015 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sys1yagi/4465481 to your computer and use it in GitHub Desktop.
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
<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