Dim the color of the log lines in the code
-
Activate or Deactivate
- Activate : dim log lines
- Press ctrl + shift + p, excute "dim log lines"
- Deactivate : undim log lines
- Press ctrl + shift + p, excute "undim log lines"
- Activate : dim log lines
-
Set the opacity of the color
- Refer to Extension Settings below
-
Set regular expression to specify the log line format
- Refer to Extension Settings below
-
Default settings specify the following formats
- Starts with "xxLOG(...)", ends with ";"
CILOG(info, "[{}] pid[{}], success to find avc sync word, skip_total[{}]", id_, pid_, skip_total_); DASHLOG(log_module(), debug, "[{}] track[{}], success to make segment, type[{}], pts[{},{}], " "dur[{},{}], sample-cnt[{}], size[{}], llsegno[{}]", id_, m->id_, type, std::uint64_t(si->pts_), pts_ms, si->duration_, dur, sample_cnt, seg_size, si->no_); LOG(error) << "hello";
- Starts with "xxlogxx.info|debug|...", ends with ";"
logger.Write(string("mainThread"), string(""), CiLogEvent::eDebug, string("test")); theLogger.info(WHERE1(m_channelID), "mpeg2ts SegmentType : %s", g_cfg->GetMpeg2tsSegmentType().c_str()); logger.info("hello,world :)"); LOGGER.debug("hello,{}",world);
- Starts with "xxlogxx.Info|Debug|...", ends with ")"
clog.Debugf("[%s] origin check success.", a.addr) log.Fatal("fatal error") log.Println("hello, World!!! :)") log.Fatalf("can not enable coredump, error(%s)", err.Error()) clog.Infof1(vfile.ReqID(), "big contents without supporting Range header => bypass") clog.Errorf1("failed to handle message, %s, %v", noti.hashKey, string(noti.message), err) clog.Errorf1(reqID, "%v", err) clog.Debugf1(reqID, "to origin, %s %s %v timeout:%v", req.Method, req.URL, req.Header, timeout)
Built with VSCODE 1.46
-
dimloglines.opacity
: opacity for the color of log lines, between 0 and 1- default value : 0.2
-
dimloglines.regExps
: regular expressions for the log line format- default values :
- "\wLOG\s\([\s\S]?\)?\s?;"
- "\w*[lL][oO][gG].?\.(Write|assert|debug|report|info|information|success|warning|error|fail|exception|critical)\s\([\s\S]?\)?\s?;"
- "\w*[lL]og.?\.(Debug|Report|Info|Success|Warning|Error|Fail|Exception|Critical|Fatal|Fatalln|Panic|Panicln|Print|Println)\w\s*\([\s\S]?\)[\t ]$"
- default values :
-
default values in VSCODE:
"dimloglines.opacity": 0.2,
"dimloglines.regExps": [
"\\w*LOG\\s*\\([\\s\\S]*?\\)?\\s*?;"
,"\\w*[lL][oO][gG].*?\\.(Write|assert|debug|report|info|information|success|warning|error|fail|exception|critical)\\s*\\([\\s\\S]*?\\)?\\s*?;"
,"\\w*[lL]og.*?\\.(Debug|Report|Info|Success|Warning|Error|Fail|Exception|Critical|Fatal|Fatalln|Panic|Panicln|Print|Println)\\w*\\s*\\([\\s\\S]*?\\)[\\t ]*$"
]
- https://github.com/AndrewMorsillo/vscode-dimmer
- https://github.com/Microsoft/vscode-extension-samples
- add multiline option in RegExp constructor
- update default regex
- upload icon
- Initial release