Skip to content

The log when executing is too much #13

Description

@jacobkim9881

Briefing

When executing this repository by ./exe.sh file.json at ./, there are some logs like below,

0 :  /usr/local/bin/node
1 :  /Users/mac/localization-manager/src/index.js
2 :  0
3 :  local_obj.json

These above logs seems not needed for users to execute this program. The solution can be deleting the logs.

Problem

Some logs like avobe at Brifing when executing by ./exe.sh file.json at ./ are not needed for users who execute the repository. Such logs are important when debugging but users may not want to read.

Solution

The logs should be deleted on the log. Desirable logs look like,

Script started.
local_obj.json will be translated into other language version local_obj.json.
spawn node ./src/index.js 0 local_obj.json
Tag name is undefined at:  []
Target language:  af
Tag name is undefined at:  undefined
file is written

Todos

  1. Fork this repository of log-with-info branch.
  2. Install npm modules at your fork.
  3. Notice logs by executing command ./exe.sh local_obj.json at ./.
  4. Edit logs by execution like the example above.
  5. If suitable information can be added then add one to the log.
  6. Test if the fork is working by executing ./exe.sh local_obj.json at ./.
  7. If error occurs fix.
  8. If no error ask pull request to log-with-info branch.

Help

  • The logs are created by console.log(indexArg, ': ' , valArg) at line 12 in ./src/index.js.
  • By executing ./exe.sh local_obj.json at ./, each index.js is executed for each target language.
  • Node execution command can be like node index.js en file.json. Each word is the value argument of the log.
  • This is how to put arguments when executing node command(It explains how a console.log() repeats 4 times).
  • If you have Permission denied error while executing then sudo ./exe.sh local_obj.json at ./.
  • This issue is derived from The logs by ./exe.sh is not clear #8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions