webosose / ares-cli

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

Support pmlog on ares-log #53

Closed ssuminahn closed 3 years ago

ssuminahn commented 3 years ago

:Release Notes: Support pmlog on ares-log

:Detailed Notes:

:Testing Performed:

  1. Pass unit test on ose for pmlogd and journald
  2. Pass eslint
  3. Check below commands
    • ares-log -cd
    • ares-log -sd pmlogd
    • ares-log
    • ares-log -f
    • ares-log -r
    • ares-log -n 2
    • ares-log -n 10 -s tmp.log
    • ares-log -h

:Issues Addressed: [WRN-4450] Implement to check status of log daemon and unit test

YoungeunKim commented 3 years ago

The connected device name is not printed on ares-log -sd and -cd

$ ./ares-log.js -cd
Current log daemon is pmlogd on CLI
The pmlogd is active in target device

cf)

$ ./ares-install.js com.domain.app_1.0.0_all.ipk 
[Info] Set target device : suOse
Installing package com.domain.app_1.0.0_all.ipk
Success
YoungeunKim commented 3 years ago

Let's have a talk about the error message

./ares-log.js -cd -d ose
Current log daemon is pmlogd on CLI
ares-log ERR! [Tips]: The current log daemon is not active in target device
ares-log ERR! [Tips]: Please change CLI's current log daemon to same as target device by ares-log -sd option

**The target's log daemon should matched with CLI's log deamon setting.** Please change  ~~ 
YoungeunKim commented 3 years ago

Please check : ares-log prints "log" from target device, but ares-log -v shows help and log. Please compare with ares-shell/ares-shell -v

$ ./ares-log.js -v
ares-log verb argv {
ares-log verb argv   level: 'verbose',
ares-log verb argv   argv: { remain: [], cooked: [ '--level', 'verbose' ], original: [ '-v' ] }
ares-log verb argv }

NAME
        ares-log(pmlogd) - Show or save logs of webOS apps and service
YoungeunKim commented 3 years ago

Code :-1: Verified :+1:

YoungeunKim commented 3 years ago
$ ./ares-log.js -cd
Current log daemon is pmlogd on CLI
The pmlogd is active in target device

The below result is just a suggestion. (it looks not good... )

$ ./ares-log.js -cd
Current CLI log daemon set to pmlogd
Current target device log daemon set to pmlogd

cf) Please refer to ares-config result.

$ ./ares-config.js -c
Current profile set to ose
YoungeunKim commented 3 years ago

Code :-1: Verified :+1:

YoungeunKim commented 3 years ago

@ssuminahn , please update ":Testing Performed:" in commit message. remove -logd option

(e.g. "jasmine --device=ose --ip=10.177.220.83 --timeInterval=12000 -logd=pmlogd"
or "jasmine --device=ose --ip=10.177.220.90 --port=24 --timeInterval=12000")
ssuminahn commented 3 years ago

@ssuminahn , please update ":Testing Performed:" in commit message. remove -logd option

(e.g. "jasmine --device=ose --ip=10.177.220.83 --timeInterval=12000 -logd=pmlogd"
or "jasmine --device=ose --ip=10.177.220.90 --port=24 --timeInterval=12000")

I've updated it.