{"repo":"megahertz/electron-log","free":true,"listed":false,"github":"https://github.com/megahertz/electron-log","clone":"git clone https://github.com/megahertz/electron-log.git","description":"Simple logging module Electron/Node.js/NW.js application. No dependencies. No complicated configuration.","language":"JavaScript","stars":1469,"topics":["log","logging","console","nwjs","electron","file"],"license":"MIT","category":"analytics","readme_excerpt":"electron-log Simple logging module Electron/Node.js/NW.js application. No dependencies. No complicated configuration. By default, it writes logs to the following locations: - on Linux: /.config/{app name}/logs/main.log - on macOS: /Library/Logs/{app name}/main.log - on Windows: %USERPROFILE%\\AppData\\Roaming\\{app name}\\logs\\main.log Installation Starts from v5, electron-log requires Electron 13+ or Node.js 14+. Feel free to use electron-log v4 for older runtime. v4 supports Node.js 0.10+ and almost any Electron build. Install with npm: npm install electron-log Usage Main process Renderer process If a bundler is used, you can import the module in a renderer code: Without a bundler, you can use a global variable electronLog . It contains only log functions like info , warn and so on. There are a few other ways how a logger can be initialized for a renderer process. Read more. Preload script To use the logger inside a preload script, use the electron-log/renderer import. There's also the electron-log/preload entrypoint, but it's used only as a bridge between the main and renderer processes and doesn't export a logger. In most cases, you don't need this preload entrypoint. Node.js and NW.js electron-log v2.x, v3.x, v4.x If you would like to upgrade to the latest version, read the migration guide and the changelog. Log levels electron-log supports the following log levels: error, warn, info, verbose, debug, silly Transport Transport is a simple function which does some work with lo","default_branch":null,"files":null,"tree":[],"storefront":"/r/megahertz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/megahertz/electron-log/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}