@loglayer/transport-electron-log
Version:
electron-log transport for the LogLayer logging library.
37 lines (26 loc) • 1.26 kB
Markdown
# Electron-log Transport for LogLayer
[](https://www.npmjs.com/package/@loglayer/transport-electron-log)
[](https://www.npmjs.com/package/@loglayer/transport-electron-log)
[](http://www.typescriptlang.org/)
Electron-log transport for the [LogLayer](https://loglayer.dev) logging library.
[Electron-log](https://github.com/megahertz/electron-log) is a logging library designed specifically for Electron applications.
## Installation
```bash
npm install loglayer @loglayer/transport-electron-log electron-log
```
## Usage
```typescript
// Main process logger
import log from 'electron-log/src/main'
// Or for Renderer process
// import log from 'electron-log/src/renderer'
import { LogLayer } from 'loglayer'
import { ElectronLogTransport } from "@loglayer/transport-electron-log"
const logger = new LogLayer({
transport: new ElectronLogTransport({
logger: log
})
})
```
## Documentation
For more details, visit [https://loglayer.dev/transports/electron-log](https://loglayer.dev/transports/electron-log)