All Projects → Artawower → turbo-log

Artawower / turbo-log

Licence: other
Fast log message inserting for quick debug.

Programming Languages

emacs lisp
2029 projects
typescript
32286 projects
C#
18002 projects
go
31211 projects - #10 most used programming language
python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to turbo-log

base
OST Base provides advanced Promise Queue Manager and other utilities.
Stars: ✭ 19 (-71.21%)
Mutual labels:  logger
capybara-chromedriver-logger
Enables console.log/error/info output from Javascript feature specs running with Chromedriver
Stars: ✭ 54 (-18.18%)
Mutual labels:  logger
lgr
Basic logger with some extras
Stars: ✭ 33 (-50%)
Mutual labels:  logger
telegram-logger-errors
Telegram logger errors package laravel | Laravel пакет telegram логгер ошибок
Stars: ✭ 15 (-77.27%)
Mutual labels:  logger
LogSwift
Simple yet advanced swift logger
Stars: ✭ 19 (-71.21%)
Mutual labels:  logger
sprout
Golang logging library supporting log retrieval.
Stars: ✭ 85 (+28.79%)
Mutual labels:  logger
RxLogs
An Android & Kotlin Reactive Advanced Logging Framework.
Stars: ✭ 12 (-81.82%)
Mutual labels:  logger
noodlog
🍜 Parametrized JSON logging library in Golang which lets you obfuscate sensitive data and marshal any kind of content.
Stars: ✭ 42 (-36.36%)
Mutual labels:  logger
telegram-log
Send a Telegram message when your scripts fire an exception or when they finish their execution.
Stars: ✭ 16 (-75.76%)
Mutual labels:  logger
herald
Log annotation for logging frameworks
Stars: ✭ 71 (+7.58%)
Mutual labels:  logger
winston-dev-console
Winston@3 console format aimed to improve development UX
Stars: ✭ 88 (+33.33%)
Mutual labels:  logger
babel-plugin-js-logger
Babel plugin to enable js-logger in your entire project efficiently.
Stars: ✭ 12 (-81.82%)
Mutual labels:  logger
NLog
Flexible logging for C# and Unity
Stars: ✭ 158 (+139.39%)
Mutual labels:  logger
EventLogger
Log event count and event time in iOS
Stars: ✭ 21 (-68.18%)
Mutual labels:  logger
Laravel-FluentLogger
fluent logger for laravel (with Monolog handler for Fluentd)
Stars: ✭ 55 (-16.67%)
Mutual labels:  logger
Android-NativeLogger
Android Logger
Stars: ✭ 21 (-68.18%)
Mutual labels:  logger
logger
☠ 😈 👀 Simple,Secure & Undetected (6.11.2017) keylogger for Windows :)
Stars: ✭ 37 (-43.94%)
Mutual labels:  logger
glog-gokit
This packages is a replacement for glog in projects that use the go-kit logger.
Stars: ✭ 18 (-72.73%)
Mutual labels:  logger
log
A simple to use log system, minimalist but with features for debugging and differentiation of messages
Stars: ✭ 21 (-68.18%)
Mutual labels:  logger
clue
a extremely high performance log library for android. 高性能的Android日志库
Stars: ✭ 27 (-59.09%)
Mutual labels:  logger

https://github.com/artawower/turbo-log/actions/workflows/lint.yml/badge.svg https://wakatime.com/badge/github/Artawower/turbo-log.svg

Turbo log - fast logging selected line or region

This project inspired by a similar package for vs-code - turbo-console-log, and provides functionality for fast log message inserting under current line. It works for js-mode, typescript-mode, go-mode and python.

How it works?

./images/sample.gif

Requirements

tree-sitter is required for correct work.

(use-package tree-sitter-langs
  :ensure t
  :defer t)

(use-package tree-sitter
  :ensure t
  :after tree-sitter-langs)

Installation

quelpa

(use-packa)
(use-package turbo-log
  :quelpa (turbo-log :fetcher github :repo "artawower/turbo-log.el")
  :bind (("C-s-l" . turbo-log-print)
         ("C-s-i" . turbo-log-print-immediately)
         ("C-s-h" . turbo-log-comment-all-logs)
         ("C-s-s" . turbo-log-uncomment-all-logs)
         ("C-s-[" . turbo-log-paste-as-logger)
         ("C-s-]" . turbo-log-paste-as-logger-immediately)
         ("C-s-d" . turbo-log-delete-all-logs))
  :config
  (setq turbo-log-msg-format-template "\"🚀: %s\"")
  (setq turbo-log-allow-insert-without-tree-sitter-p t))

doom

;; packages.el
(package! turbo-log :recipe (:host github :repo "artawower/turbo-log"))
;; config.el
(use-package turbo-log
  :bind (("C-s-l" . turbo-log-print)
         ("C-s-i" . turbo-log-print-immediately)
         ("C-s-h" . turbo-log-comment-all-logs)
         ("C-s-s" . turbo-log-uncomment-all-logs)
         ("C-s-[" . turbo-log-paste-as-logger)
         ("C-s-]" . turbo-log-paste-as-logger-immediately)
         ("C-s-x" . turbo-log-delete-all-logs))
  :config
  (setq turbo-log-msg-format-template "\"🚀: %s\"")
  (setq turbo-log-allow-insert-without-tree-sitter-p t))

Customization

Common configs

turbo-log-msg-format-template - template for entire part inside logger

turbo-log-payload-format-template - template for payload part (selected region or implicite extracted identifier)

turbo-log-line-number-format-template - optional template for formatting line number, when not provided, the line number will not be inserted

turbo-log-buffer-name-format-template - template for file name inserting

turbo-log-argument-divider - divider for arguments (in most case it’s a comma)

turbo-log-allow-insert-without-tree-sitter-p - allow to insert logs without tree-sitter (in such case logger will be inserted next line only, also its a necessary for modes without tree-sitter support)

Language specific configs

turbo-log-loggers - its a most interesting part of your config. You can use every settings as plist for specific logger (without turbo-log prefix), for example:

(turbo-log-configure
 :modes (typescript-mode js2-mode web-mode)
 :strategy merge

 :loggers ("console.log(%s)" "console.debug(%s)" "console.warn(%s)")
 :jump-list ((class_declaration (method_definition "constructor")))
 :identifier-node-types (identifier member_expression)
 :post-insert-hook (prettier-prettify)
 :msg-format-template "'🦄: %s'")

Where:

modes - list of modes which have to be updated

strategy - update strategy, merge will update existing plist (only first level of nested structure), replace will override all mode settings

loggers - list of available loggers, when there are more then 1 turbo-log-print will ask to choose logger.

jump-list - internal command for insert current logger to specific line number by determined node type. Its a alist that consist of cons where car is node type and cdr is a alist of inserting position and optional name of foud node type, after which logger will be inserted.

identifier-node-types - optional alist of node types for extracting identifiers

post-insert-hook - list of hooks that will be triggered after logger inserted. Its a good place to call format-all-buffer or prettier-prettify methods.

Tested languages

  • [X] Python
  • [X] Golang
  • [X] Javascript
  • [X] Typescript
  • [X] Java
  • [X] C#
  • [X] Rust
  • [X] Ruby
  • [-] Lua (Without tree-sitter)
  • [-] Elisp (Without tree-sitter)
  • [ ] C++

Contributing

Any contribution is greatly appreciated! Run eldev test, checkdoc and package-lint-current-buffer (from package-lint ) before creating the pull request

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].