-
Notifications
You must be signed in to change notification settings - Fork 89
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
完成日志打印功能 #4
Comments
能说说不用createWriteStream而用数组的原因么? |
因为这样我就省得将字符串转换为Buffer这一步了,也避免了利用流时出现的事件回调套嵌问题 |
在fs模块中,写到文件时还是要转换成Buffer的
|
……这个以后再改进吧,如果你有什么好补丁,速速提交上来 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
没有使用经典的createWriteStream方法,我把要打印的日志push进一个数组,然后hfs.writeFile用递归输出。如果有什么好的实现请告诉我
logger.js
The text was updated successfully, but these errors were encountered: