webosose / ares-cli

ares-cli is a command-line interface(CLI) for webOS
Apache License 2.0
38 stars 17 forks source link

Support ares-log feature #31

Closed ssuminahn closed 3 years ago

ssuminahn commented 3 years ago

Support ares-log

:Detailed Notes: ares-log provides the user with a more convenient function to check the log. Most of the options provided by the existing journald can be utilized. In addition, it provides a function to save log, search log file list, and search unit list.

:Testing Performed:

  1. Pass unit test on ose and auto
  2. Pass eslint
  3. Check below options
    • node ares-log.js -sd pmlogd
    • node ares-log.js -cd
    • node ares-log.js -f
    • node ares-log.js -r
    • node ares-log.js -n 7
    • node ares-log.js -k
    • node ares-log.js -b
    • node ares-log.js -S today
    • node ares-log.js -U yesterday
    • node ares-log.js -S 2021-04-07 21:45:00 --until 2021-04-07 21:46:00
    • node ares-log.js -f -pid 1834
    • node ares-log.js -f -o json
    • node ares-log.js -n 7 -s
    • node ares-log.js -f -s
    • node ares-log.js -s tmp.log
    • node ares-log.js -s tmp
    • node ares-log.js -f -o -d ose
    • node ares-log.js -f -o jjson -d ose
    • node ares-log.js --file-list
    • node ares-log.js --file system.journal
    • node ares-log.js -ul
    • node ares-log.js -ul -dp 1
    • node ares-log.js -u com.webos.service.position -d auto
    • node ares-log.js -u sam -dp 1 -f -d auto

:Issues Addressed: [PLAT-134677] Support to unit test of ares-log

ssuminahn commented 3 years ago

code :+1: verify :+1:

YoungeunKim commented 3 years ago

Code :-1:

ssuminahn commented 3 years ago

code :+1: verify :+1:

YoungeunKim commented 3 years ago

Please add ares-log path to package.json

  "license": "Apache-2.0",
  "bin": {
    "ares": "bin/ares.js",
    "ares-config": "bin/ares-config.js",
    "ares-device": "bin/ares-device.js",
    "ares-generate": "bin/ares-generate.js",
    "ares-inspect": "bin/ares-inspect.js",
    "ares-install": "bin/ares-install.js",
    "ares-launch": "bin/ares-launch.js",
    "ares-package": "bin/ares-package.js",
    "ares-push": "bin/ares-push.js",
    "ares-pull": "bin/ares-pull.js",
    "ares-server": "bin/ares-server.js",
    "ares-setup-device": "bin/ares-setup-device.js",
    "ares-shell": "bin/ares-shell.js"
  },
  "engines": {
ssuminahn commented 3 years ago

Please add ares-log path to package.json

  "license": "Apache-2.0",
  "bin": {
    "ares": "bin/ares.js",
    "ares-config": "bin/ares-config.js",
    "ares-device": "bin/ares-device.js",
    "ares-generate": "bin/ares-generate.js",
    "ares-inspect": "bin/ares-inspect.js",
    "ares-install": "bin/ares-install.js",
    "ares-launch": "bin/ares-launch.js",
    "ares-package": "bin/ares-package.js",
    "ares-push": "bin/ares-push.js",
    "ares-pull": "bin/ares-pull.js",
    "ares-server": "bin/ares-server.js",
    "ares-setup-device": "bin/ares-setup-device.js",
    "ares-shell": "bin/ares-shell.js"
  },
  "engines": {

done

YoungeunKim commented 3 years ago

Please fix context

$ node ares-log.js -s test.log
..
Created /home/ye0607kim/project/github/ares-cli/bin/test.log
Success
$ node ares-log.js -s
....

Created 20210511_180800.log
Success
YoungeunKim commented 3 years ago

Code :+1: Verified :+1: