Skip to content

Instantly share code, notes, and snippets.

@sys1yagi
Last active December 10, 2015 17:08
Show Gist options
  • 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