All Projects → hezedu → log-master

hezedu / log-master

Licence: MIT license
split the log

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to log-master

LogDelegate
Simple, pretty and powerful logger for android
Stars: ✭ 287 (+925%)
Mutual labels:  log
LogiAM
基于日志模板构建,采集任务动态管控、数据质量精确度量,一站式日志采集平台
Stars: ✭ 199 (+610.71%)
Mutual labels:  log
loggie
A lightweight, cloud-native data transfer agent and aggregator
Stars: ✭ 844 (+2914.29%)
Mutual labels:  log
git-split-diffs
GitHub style split diffs in your terminal
Stars: ✭ 2,423 (+8553.57%)
Mutual labels:  split
LogESP
Open Source SIEM (Security Information and Event Management system).
Stars: ✭ 162 (+478.57%)
Mutual labels:  log
crab
Golang API Framework
Stars: ✭ 57 (+103.57%)
Mutual labels:  log
woodpecker-client
异常日志收集客户端 环境隔离版本
Stars: ✭ 51 (+82.14%)
Mutual labels:  log
Klog
🎼 A Kotlin log lib, making the output log more elegant and more beautiful.
Stars: ✭ 21 (-25%)
Mutual labels:  log
Log
Daily logging tool and data visualizer.
Stars: ✭ 30 (+7.14%)
Mutual labels:  log
PCPXlog
通过简单配置将日志同时输出到console、file、MongoDB | 可以pip安装
Stars: ✭ 13 (-53.57%)
Mutual labels:  log
LogDNA-Android-Client
Android client for LogDNA
Stars: ✭ 22 (-21.43%)
Mutual labels:  log
JJSwiftLog
Swift log library for all platform
Stars: ✭ 51 (+82.14%)
Mutual labels:  log
TLog
Android日志工具
Stars: ✭ 16 (-42.86%)
Mutual labels:  log
pyqso
PyQSO is a contact logging tool for amateur radio operators.
Stars: ✭ 75 (+167.86%)
Mutual labels:  log
RFKit
Toolkit for daily Cocoa development. Since 2012.
Stars: ✭ 20 (-28.57%)
Mutual labels:  log
aiologger
Asynchronous logging for Python and asyncio
Stars: ✭ 92 (+228.57%)
Mutual labels:  log
rust cms
使用Rust编写一个CMS(内容管理系统)可以做为个人博客,公司网站
Stars: ✭ 32 (+14.29%)
Mutual labels:  log
logtail
logtail is a log tailing utility, support tailing multiple commands output stream, transferring matching content to file/webhook(like dingtalk)
Stars: ✭ 33 (+17.86%)
Mutual labels:  log
fakessh
A dockerized fake SSH server honeypot written in Go that logs login attempts.
Stars: ✭ 42 (+50%)
Mutual labels:  log
base
小而美的业务基础框架,也是本项目的核心
Stars: ✭ 47 (+67.86%)
Mutual labels:  log

log-master 1.0.0

简单的Log定时切割工具。可切割正在被写入的log文件,并保持完整性。

不支持window平台。

安装

npm install log-master

使用方法

split

将本机上所有log用时间分割,汇集到一个文件夹里。

var logMaster = require('log-master');
logMaster.split({ //切割,目前唯一的功能
  "from": { //源文件夹,可多选。
    "forever": "/root/.forever",
    "app1": "/app1logdir",
    "app2": "/app2logdir"
  },
  "Suffix": [".log"], //要切割的文件类型,可多选。默认 [".log"]
  "to": __dirname, //目标文件夹,log都会到这里。
  "Interval": 1000 * 60 * 60 * 24, //切割时间间隔,默认一天。
  "timeFormat": "yyyy年MM月dd日HH时mm分ss秒", //时间格式(生成的文件夹名),默认为yyyy年MM月dd日HH时mm分ss秒
  "startTime": "00:00" //开始时间,默认零点,精确到秒的话就:"00:00:00"
});

运行

nohup node youapp.js &

或用其它守护进程比如:pm2, forever

注意

手动输出Log时需要使用 >> 而不是 > 符号。例:

使用 > 将会得到:

nohup node ./loop.js >/somedir/you.log &

image
在vim下看,切割后的文件会包含之前被清空的占位符,并且体积逐渐增大。

使用 >> 才会得到你想要的结果。

nohup node ./loop.js >>/somedir/you.log &

image

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].