Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/topheman/softlogger
Simple logger that overrides console.log and let's you inject it in a canvas
https://github.com/topheman/softlogger
Last synced: about 2 months ago
JSON representation
Simple logger that overrides console.log and let's you inject it in a canvas
- Host: GitHub
- URL: https://github.com/topheman/softlogger
- Owner: topheman
- License: mit
- Created: 2013-05-17T10:25:28.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-17T22:21:39.000Z (over 11 years ago)
- Last Synced: 2024-04-08T00:39:40.291Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 109 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SoftLogger
==========Simple logger that overrides console.log and let's you inject it in a canvas (or wherever you want).
Example using SoftLogger : http://topheman.github.io/boxbox/boxbox/demos/topheman/smileyFaces/demo.html
Instanciation :
```js
//retrieve your canvas
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');//instanciate your logger
var logger = SoftLogger.getInstance({
fitToCanvas:true,
canvas: canvas,
ctxOptions : {
x: 10,
y: 10
}
});//then, in your animation/game loop, use the draw method
logger.draw(ctx);
```Methods
SoftLogger.getInstance(options)
.draw(ctx)
.toggleConsole()
.getLogs()