rust-lang/log

logging without file/line?

stevefan1999-personal opened this issue · 3 comments

Out of privacy concern I don't want to include references to the file and lines so as to make reverse engineer harder, but far as I see there is no way to opt out to have logging without those information in the standard macros. I can always add the record myself but it would be tedious.

You can configure your logging implementation to not output them if you'd like.

@stevefan1999-personal if you can't control the logging implementation you can also build your own log records using RecordBuilder, easiest is likely to copy the log! macro code, this way at least your code won't expose the file/line.

Coming back through some triage. This issue hasn’t seen any activity in a while so I’ll go ahead and close it.

For cases where the log macros don’t serve a particular use-case we do provide lower-level APIs you can build off like @Thomasdezeeuw pointed out that may better cater to your needs.