Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract log util as a solo component #40

Closed
liupan163 opened this issue Jan 27, 2021 · 4 comments
Closed

extract log util as a solo component #40

liupan163 opened this issue Jan 27, 2021 · 4 comments
Assignees
Milestone

Comments

@liupan163
Copy link
Contributor

extract the file of log_util as a solo package , which could be exported and used by other packages.

@liupan163 liupan163 self-assigned this Jan 27, 2021
@liupan163 liupan163 added this to the v2.3 milestone Jan 27, 2021
@liupan163
Copy link
Contributor Author

liupan163 commented Jan 27, 2021

  1. 将日志做成个单独的包,其他项目通过引用来使用。
  2. log文件名,通过设置可选参数logFileName. 默认值cashbox.log
  3. 日志生成规则: 根据每次调用,每天生成一个日志文件。 eg格式: 2020_01_01_cashbox.log
    日志清除策略:调用清除功能时,默认只保留最近十天以内的日志。 具体时间的值(默认十天),做成参数,调用时 可根据需要更改。
  4. 测试结果:输出内容到log文件时,可在控制台logcat看到日志内容,符合调试需求。

todo: log功能被并发调用时,处理策略?

@liupan163
Copy link
Contributor Author

增加参数isSave2File,调用时,可控制日志内容,是否输出到文件。(默认true,同时输出到文件和控制台)
logUtil.d("tag999", " message999", isSave2File: false);

@liupan163
Copy link
Contributor Author

重新打开,整理流程到文档

@liupan163 liupan163 reopened this Jan 30, 2021
@liupan163
Copy link
Contributor Author

问题:Dart File.writeAsString() method does not write to file if await is not done immediately

dart-lang/sdk#36087

TigerInYourDream added a commit that referenced this issue Feb 5, 2021
* 'master' of https://github.com/scryinfo/cashbox:
  add |> add demo that test wallet dylib
  upd |> update readme
  modify token query func
  upd |> update log component
  upd |> reform the component from log_util to logger, fix #40
  add token list query,database version,add wallet token func
  #39 not work
  #39 test tls server is ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant