dockerã§èµ·åãã£ã±ãªãã®ã³ã³ããã®ãã°ããã£ã¹ã¯ãå§è¿«ãã¦ããã®ã§ãã°ãæ¶å»ããæ¹æ³ã¨ãã°ã®ãã¼ãã¼ã·ã§ã³è¨å®ã«ã¤ãã¦èª¿ã¹ã¾ããã ã§æ¸ããGROWIã®dockerã³ã³ããï¼docker-composeï¼ãä¾ã«ãã¦ãã¾ããå¿ è¦ã«å¿ãã¦ç½®ãæããã ããã©ã«ãã®ãã®ã³ã°ãã©ã¤ãã¯ãjson-fileã$ docker info | grep Logging Logging Driver: json-filejson-fileã¯ã³ã³ããã®æ¨æºåºåã¨æ¨æºã¨ã©ã¼ã/var/lib/docker/containers/[container-id]/[container-id]-json.logã«åºåããããèµ·åãã£ã±ãªãã ã¨ãã£ã¹ã¯ã¹ãã¼ã¹ãå§è¿«ããã ãã°ãæåã§æ¶å»ããã¾ãèµ·åãã¦ããã³ã³ããã®ä¸è¦§ã表示ããã $ docker-compose ps Name Command State
docker ã§ã³ã³ãããèµ·åããã¨ããã³ãã³ãã¨ãã¦æå®ããããã»ã¹ãæ¨æºåºåã»æ¨æºã¨ã©ã¼åºåã«åãããã°ã¯ docker logs ${ã³ã³ããID} ã§é²è¦§ã§ããã èªå㧠docker ã®ãµã¼ãã¹ãéç¨ããã«ããã£ã¦ããã®ãã°ãæºã¾ãã¤ã¥ãã¦ãã¹ãå´ã®ãã£ã¹ã¯ãå§è¿«ãã¦ãã¾ãã®ã§ã¯ãªããï¼ã¨ããæ¸å¿µããã£ãã®ã§ããã°ã®ä¿åå ´æããã¼ãã¼ãæ¹æ³ã調ã¹ãã
ä»æ¥ã¯ãDockerã®ãã°ã«ã¤ãã¦èª¿ã¹ããã¨æãã¾ãã éç¨ããã«ããéçºã§å©ç¨ããã«ããã°ãåºåããã¨ãããã¨ã¯é常ã«éè¦ã§ãã ç§ã¯éç¨ã§ä½¿ç¨ããããã°ã©ã ã§ã¯ãããsyslogã«å¯¾ãã¦åºåããããã¨ãå¤ãã§ãã ã¾ããéçºä¸ã«ã¯printãªã©ã®æ¨æºåºåãã¨ã©ã¼åºåãå©ç¨ãããã¨ãå¤ãã§ãã Dockerã§ã¯ã©ã®ããã«ãªã£ã¦ããã®ã§ããããã Dockerã®ãã°åºå ããã©ã«ãã¯ï¼ Dockerã®ããã©ã«ãã®åºåã¯ãJSONå½¢å¼ã§ä¿åããã¦ãã¾ãã ã³ã³ããèµ·å ã¾ããã³ã³ãããèµ·åãã¦ã³ãã³ããå®è¡ãã¦ã¿ã¾ãããã # docker run -it -v /dev/log:/dev/log --name test01 centos:6 /bin/bash [root@ca4bd7b2ad6a /]# ps -ef UID PID PPID C STIME TTY TIME CMD r
ï¼æ¯å表示æ³ã«åºã¥ã表è¨ï¼ãæ¬ãµã¤ãã®ã³ã³ãã³ãã«ã¯ãååããã¢ã¼ã·ã§ã³ãå«ã¾ãã¦ããå ´åãããã¾ãã SoftEtherï¼ãã°ãã¼ãã¼ã·ã§ã³ï¼ã®è¨å®SoftEtherï¼VPN Serverï¼ã¯3種é¡ã®ãã°ãåºåããäºãã§ãã¾ãã ãµã¼ããã°ä»®æ³ããæ¯ã®ã»ãã¥ãªãã£ãã°ä»®æ³ããæ¯ã®ãã±ãããã°SoftEtherã¯ãã°ãåºåãã£ã±ãªãã§åé¤ããä»çµã¿ãç¨æããã¦ãã¾ããããã¼ãã¼ã·ã§ã³ããä»çµã¿ãæºåããå¿ è¦ãããã¾ãã SoftEtherã¯æ¥ä»ãä»ãããã°ãã¡ã¤ã«ãªã®ã§ãlogrotateã«ã¯çµã¿è¾¼ã¾ãã¹ã¯ãªãããå®æçã«å®è¡ãåé¤ããã¾ãã # cd /etc/cron.daily/ # vi vpnserver ãã¡ã¤ã«ã®æ´æ°æ¥ä»ï¼ã¿ã¤ã ã¹ã¿ã³ãï¼ã30æ¥ä»¥åã®ãã®ãåé¤ããã¾ãã #!/bin/sh find /usr/local/vpnserver/*_log -name '*.l
ã¯ããã« ãã¡ã㯠ãããã Vue.js ãã¥ã¼ããªã¢ã«(3) ~ ã³ã³ãã¼ãã³ãã«ããæ§æ ã®ç¶ãã§ãã ç¶ããã®ã§ãããä»åãä¸å¿ååãã³ãºãªã³ã£ã½ãé²ãã¾ããã ãã®è¨äºåä½ã§ãã¾ãèªããããªã¨æãã¾ãã ããã¥ã¡ã³ããèªã¿é²ãã¦ããã ãã§ã¯è¦éããã¡ãªå¨è¾ºãã¼ã«ã«ã¤ãã¦ç´¹ä»ãã¾ãã Vue.js devtools ããã¯å ¬å¼ã«ãæ¸ãã¦ããã¾ãããã¾ãã«ãå¿ é ãªã®ã§è¨åãã¾ãã ãã³ãºãªã³ï¼ ãã¥ã¼ããªã¢ã«ã®ç¬¬ä¸åã¾ã§ãã£ãæ¹ã¯ã Chrome æ¡å¼µæ©è½ã«è¿½å ãã ãã©ã¦ã¶ã§ devtools ãéãã¦ã¿ã¦ãã ããã ã³ã³ãã¼ãã³ãã®æ§æã¨åã³ã³ãã¼ãã³ãã® props ã data ãè¦ããã¨ãã§ããã¯ãã§ãã ãã£ã¡ã便å©ã§ããã UI ãã¬ã¼ã ã¯ã¼ã¯ ç¬èªã®ãã¶ã¤ã³ã«ãã ããããã£ã¦ä¸ã¤ CSS åã¨æéããã£ã·ãããå ´åãé¤ãã¦ã UI ãã¬ã¼ã ã¯ã¼ã¯ã使ããªãæã¯ãªãã§ã
nodeã®ãã¬ã¼ã¯fsã«ä¾åãã¦ãããã®ãå¤ãã ã¯ã©ã¤ã¢ã³ãã§æ°è»½ã«ä½¿ããã®ãå°ãªãï¼Winston ãBunyanãlog4js-nodeå ¨é¨ã ãï¼ loglevelã¯ãªãã§ãè¡ãããã³ãªã®ã§ãã¡ããNuxtJSã§ä½¿ãã github.com plugins/logger.js /** * ref. https://github.com/pimterry/loglevel */ import Vue from 'vue' import * as log from 'loglevel' // å¿ è¦ã§ããã° log.noConflict(); log.setLevel('trace') Vue.prototype.$log = log nuxt.config.js plugins: [ ... { src: '~/plugins/logger.js', ssr: false }, ], t
1. 使ãå§ãã 1.1 ãã¼ã¸ã§ã³ç®¡çã«é¢ã㦠1.2 Gitç¥å² 1.3 Gitã®åºæ¬ 1.4 ã³ãã³ãã©ã¤ã³ 1.5 Gitã®ã¤ã³ã¹ãã¼ã« 1.6 æåã®Gitã®æ§æ 1.7 ãã«ããè¦ã 1.8 ã¾ã¨ã 2. Git ã®åºæ¬ 2.1 Git ãªãã¸ããªã®åå¾ 2.2 å¤æ´å 容ã®ãªãã¸ããªã¸ã®è¨é² 2.3 ã³ãããå±¥æ´ã®é²è¦§ 2.4 ä½æ¥ã®ããç´ã 2.5 ãªã¢ã¼ãã§ã®ä½æ¥ 2.6 ã¿ã° 2.7 Git ã¨ã¤ãªã¢ã¹ 2.8 ã¾ã¨ã 3. Git ã®ãã©ã³ãæ©è½ 3.1 ãã©ã³ãã¨ã¯ 3.2 ãã©ã³ãã¨ãã¼ã¸ã®åºæ¬ 3.3 ãã©ã³ãã®ç®¡ç 3.4 ãã©ã³ãã§ã®ä½æ¥ã®æµã 3.5 ãªã¢ã¼ããã©ã³ã 3.6 ãªãã¼ã¹ 3.7 ã¾ã¨ã 4. Gitãµã¼ãã¼ 4.1 ãããã³ã« 4.2 ãµã¼ãã¼ç¨ã® Git ã®åå¾ 4.3 SSH å ¬ééµã®ä½æ 4.4 ãµã¼ãã¼ã®ã»ããã¢ãã 4.5 Git
cron ã§æå®æéã«å®è¡ããããã«è¨å®ããã®ã«ããªããæå¾ ããåä½ããã¦ããªãã ãããªãã¨ãããã¾ãããã ãããªæã¯ãå大ãªã syslog æ§ã«å©ãã¦ãããã¾ãããã 1. rsyslog ã§cronç¨ã®ãã°ãåãããã«è¨å®ãã ã»rsyslog ã®è¨å®ãã¡ã¤ã«ï¼/etc/rsyslog.confï¼ãéãã sudo nano /etc/rsyslog.conf ã»cronç¨ã®ãã°ã®è¨å®è¡ãã³ã¡ã³ãã¢ã¦ãããã¦ããã®ã§ # ãæ¶ãã cron.* /var/log/cron.log ï¼ä¸é¨æç²ãã¦ããã ããªã®ã§ãééã£ã¦ãä¸è¨ã®ã¿æ®ãã¨ãã¯ããã¦ãã ããã ã»è¨å®ã®å¤æ´å¾ã¯åèµ·å sudo /etc/init.d/rsyslog restart 2. cron ã®ãã°ã¬ãã«ãè¨å®ãã ã»cron ã®è¨å®ãã¡ã¤ã«ï¼/etc/default/cronï¼ãéãã sudo nano /e
/etc/ âââ cron.d â  âââ anacron âââ cron.daily âââ cron.hourly âââ cron.monthly âââ crontab âââ cron.weekly cron.d ãã®ãã©ã«ãã«å ¥ã£ãæ¡å¼µåã®ãªããã¡ã¤ã«ãå®è¡ããã¾ãã æ®æ®µã¯ãã¡ãã®ãã©ã«ãå ã«ãã¡ã¤ã«ãä½æãã¦æä½ãè¡ãã¾ã cron.*** ãã¡ãã¯ãæ¥ãã¨ãæéãã¨ãæãã¨ããªã©ã å®è¡ããããããã«æ¢ã«ä½æããã¦ãã¾ãããã®ä¸ã«å®è¡ãã¡ã¤ã«ãå ¥ããã°å®è¡ã§ãã¾ããã ãã¡ã¤ã«ãè¨å¤§ã«ãªããªãéãcron.dã«å人ã§ä½æããã»ãã楽ããããã¾ãã crontab ãã®ãã¡ã¤ã«ã¯cronã®ä¸çªã¡ã¤ã³ã®ãã¡ã¤ã«ã§ãã ãã¡ãã«è¨è¼ãã¦ãåãã¾ããããã®ãã¡ã¤ã«ã®å½¢å¼ãå ã«åãããã¨ã«ãªãã®ã§ã ç·¨éããéã¯ãã£ããããã¯ã¢ãããã¨ã£ã¦ãããã¨ããããããã¾ãã 2.
facebook ãªãã£ã¹ç æè¡é¨ã®Komaï¼Twitterã¢ã«ã¦ã³ãã®ä¸ã®äººï¼CEOï¼ã§ãã å¹³ææå¾ã®æ稿ã§ãã å¼ç¤¾ã§ã¯ãNode.js + Expressãã§APIãä½æããäºãå¤ã ããã®ã§ããã ãã®éãã¢ã¯ã»ã¹ãã°ã¯å¥ã¬ã¤ã¤ã¼ã§åºåãã¦ããªã¯ã¨ã¹ããã°ã¯åæ¥åå¦çå ã§åºåãã¦ãã¾ãã ä»åããããå ±éåãã¦ã¾ã¨ãããã¨æãã¾ãã åãã¼ã¸ã§ã³ã¯ä»¥ä¸ã®éãã§ãã node 10.13.0 log4js 3.0.6 â»ãããããã¡ãã£ã¨åã®ãã¼ã¸ã§ã³ã«ãªãã®ã§ãåèã«ãããæ¹ã¯ã注æä¸ããã log4js ã®ã¤ã³ã¹ãã¼ã« ã¾ã㯠log4js ã®ã¤ã³ã¹ãã¼ã«ã§ã npm install log4js Configãã¡ã¤ã«ã®ä½æ ãã°ã®åºåã¬ãã«ãªã©ã®è¨å®é¢é£ã¯ãå¥ãã¡ã¤ã«ã«ãããã®ã§ã ã[ããã¸ã§ã¯ãã«ã¼ã]/src/configãã«ãlog4js.config.jsonããã¡
ä»åã¯ãNode.jsã§ã«ã¹ã¿ãã¤ãºå¯è½ãªãã°ï¼loggerï¼ãåºåã§ããlog4js-nodeã®ä½¿ãæ¹ã«ã¤ãã¦å¦ç¿ãã¦ããã¾ãããï¼ ãå¹çãããã°ãåºåãããã ããã°ã®åºåãã«ã¹ã¿ãã¤ãºãããã ããã°ãå¥ã®ãã¡ã¤ã«ã«æ¸ãåºãããã ãã®ãããªå 容ãå«ãã¦ãæ¬è¨äºã§ã¯ä»¥ä¸ã®ãããªæ§æã§è§£èª¬ãã¦ããã¾ãï¼ ãloggerãã¨ã¯ï¼ ã¾ãã¯ä»åã®ãã¼ãã§ããããã°ï¼loggerï¼ã«ã¤ãã¦ããããããã¦ããã¾ãããã ãã°ï¼loggerï¼ã¯ãç°¡åã«è¨ãã¨ãè¨é²ãåããã¨ãã§ããã主ã«ãããã°ãªã©ã§ã¨ã©ã¼ã®åå ãæ¢ãã¨ãã«ãã使ããã¾ãã Node.jsã¯console.log()ã¨ããã¡ã½ãããæ¨æºã§ä½¿ããã®ã§ããã°ãåºåãããã¨ã¯ç°¡åã§ãã ãã ããä»åç´¹ä»ãããlog4js-nodeãã®ã¢ã¸ã¥ã¼ã«ãæ´»ç¨ãããã¨ã§ãå¹çããã«ã¹ã¿ãã¤ãºå¯è½ãªãã°ãåºåãããã¨ãå¯è½ã«ãªãã¾ãã Node.
ããã«ã¡ã¯ãããã§ããä»å¹´ããããããé¡ããã¾ãã Node.jsåå¿è ã®ç§ã¯ããã°ãåºåããã®ã«ã¤ãã¤ã`console.log()`ã使ããããªã£ã¦ãã¾ãã¾ãããã¡ãã¨ãã°ãåºåããããã«log4jsã使ã£ã¦ã¿ã¾ããã ããã«ã¡ã¯ãããã§ããä»å¹´ããããããé¡ããã¾ãã Node.jsåå¿è ã®ç§ã¯ããã°ãåºåããã®ã«ã¤ãã¤ãconsole.log()ã使ããããªã£ã¦ãã¾ãã¾ãããã¡ãã¨ãã°ãåºåããããã«log4jsã使ã£ã¦ã¿ã¾ããã ã¤ã³ã¹ãã¼ã« $ npm install log4js ã³ã³ã½ã¼ã«ã«ãã°åºå hello.js 'use strict' const log4js = require('log4js') const logger = log4js.getLogger(); logger.level = 'debug'; logger.debug('Hello world
æ¦è¦ ã¡ãã£ã¨æ¢ãããããããããã¨ã®åºæ¥ããç´ æµãªWebãµã¼ãã¹ãããããã§ã¯ããã®ã§ããã éçºè ãããªã人ã«ãä»æã®éçºå 容ãã®ãããªãã®ãå ±æãããã éçºã¡ã³ãã¼ãã¨ã«ãã©ã®ãããä½æ¥ããã¦ãããã®ç®å®ãåºãããã æ¯æãéçºããå 容ãæ¯ãè¿ãã®ã«ä½¿ããè³æãç°¡åã«ä½ãããã ã¨ãããã¨ã§ã ä½ã¨ãªãGitã®ã³ããããã°ãCSVåºåãã¦ãGoogle SpreadSheetã¨ãExcelã¨ãã«è²¼ãä»ãããã¨ãèãã¾ããã ããæ¹ ã³ã³ã½ã¼ã«ã§Gitã¬ãã¸ããªã®ãã£ã¬ã¯ããªãéã git --no-pager log --since=2017-03-01 --until=2017-03-31 \ --pretty=format:"\"%ad\",\"%h\",\"%an\",\"%s\"" \ --date=short --no-merges --all --date-order
å°ãç´°ããã§ãããããã®ã½ã¼ã¹ã³ã¼ãã¯æå³ããã¨ããã«ãã°åºåããã®ãï¼ï¼ããåä½ãã¹ãã¬ãã«ã§ã¡ããã¨ç¢ºèªãã¦ãããã¨ã§ãå質ã®åä¸ã«ç¹ããã¾ãã ä»åã¯testfixturesã®LogCaptureã試ãã¦ã¿ã¾ããã使ãæ¹ã¯ãã¡ãã®ããã¥ã¡ã³ããåèã«ãã¾ããã â»pytestã使ã£ã¦ããå ´åã¯ããã¡ãã®ããã°ã§ç´¹ä»ããã¦ããLogCaptureFixtureã使ã£ã¦ãè¯ãã¨æãã¾ãã ã»ããã¢ãã ãã¼ã¸ã§ã³ $ python --version Python 3.6.9 ã©ã¤ãã©ãªã¤ã³ã¹ãã¼ã« pip install pytest testfixtures ã³ã¼ã ã½ã¼ã¹ã³ã¼ãï¼src/main.pyï¼ import json import logging logger = logging.getLogger(__name__) logger.setLevel(logging.DE
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}