Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timgabets/atm-logging
A simple logging service for electron applications
https://github.com/timgabets/atm-logging
Last synced: 9 days ago
JSON representation
A simple logging service for electron applications
- Host: GitHub
- URL: https://github.com/timgabets/atm-logging
- Owner: timgabets
- Created: 2017-11-28T07:49:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-29T14:21:02.000Z (about 7 years ago)
- Last Synced: 2024-12-17T07:56:53.691Z (about 1 month ago)
- Language: JavaScript
- Size: 69.3 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# atm-logging
A simple logging service for electron applications that puts the data into "log-output" object and automatically scrolls the data to the very bottom, so the latest data is displayed in the bottom of the page:
![log-area](img/log-area.png)## Usage:
Define the logging area in you html, e.g.:
```html
```Apply some styling for this area:
```css
.log-output {
height: 440px;
color: #575B5E;
font-size: 12px;
font-family: monospace;
white-space: pre-wrap;
border:1px solid lightgrey;
}
```Import and use the library:
```javascript
import Log from 'atm-logging';
const log = new Log();log.info('This will be shown as a usual text');
log.warn('This will be displayed bold');
log.error('This will be colored red');
log.info('You may also add a timestamp by passing {timestamp: true}', {timestamp: true});
log.info('And add some title as well {by passing title object: {timestamp: true, title: "IDDQD"}', {timestamp: true, title: 'IDDQD'});
```![usage](img/usage.png)