18
輸出:如何着色Multitail中的Rails日誌?在XFCE終端<code>tail logs/development.log</code>
multitail log/development.log
Rails添加轉義碼自動日誌文件。見development.log
文件:
^[[1m^[[36m (84.1ms)^[[0m ^[[1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) ^[[0m
^[[1m^[[35m (92.6ms)^[[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
^[[1m^[[36m (0.2ms)^[[0m ^[[1mSELECT version FROM "schema_migrations"^[[0m
^[[1m^[[35m (159.3ms)^[[0m INSERT INTO "schema_migrations" (version) VALUES ('20130327221553')
^[[1m^[[36m (59.9ms)^[[0m ^[[1mINSERT INTO "schema_migrations" (version) VALUES ('20130326152730')^[[0m
^[[1m^[[35m (59.8ms)^[[0m INSERT INTO "schema_migrations" (version) VALUES ('20130327173637')
multitail -c
產生非可用輸出。
如何上色在Multitail日誌,而無需編寫自己的配色方案?
我再次一派,現在想再次給予好評...謝謝! –
我很高興它有幫助。其實這是回答自己的問題的主要原因 - 稍後找到它;) –