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

The "log" does not output anything to the console, but the "log_err" outputs. #625

Closed
dmitriy-bodroff opened this issue Jul 6, 2011 · 1 comment

Comments

@dmitriy-bodroff
Copy link

OS: Linux/Ubuntu.

The log does not output anything to the console, but the log_err outputs. Following the documentation, I set the RUST_LOG environment variable as:

$ export RUST_LOG=main,std::io

But log does not write to the console still.

$ ./hello
$

hello.rs

fn main() {
  log "Hello World";
}

For log_err it works:

fn main() {
  log_err "Hello World";
}

$ ./hello
rt: ---
rt: a296:main:main:                   rust: Hello World
$
@marijnh
Copy link
Contributor

marijnh commented Jul 6, 2011

It seems someone updated the code to use the filename as the top-level module scope for log tags if no crate name is defined through the metadata system. So in your case, you need to use RUST_LOG=hello, rather than main. I'll update the wiki.

@marijnh marijnh closed this as completed Jul 6, 2011
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Add more termios constants

Went through and found some more termios constants that were missing and added them. I skipped some platforms (solaris, uclibc) and assumed Android has the same constants are Linux, as I couldn't find a good reference for what Android exposes, but it generally follows linux, so I assumed the same was true for some of those values.

## References:
 FreeBSD:
   * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/sys/sys/_termios.h
   * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/include/termios.h
 NetBSD: https://github.com/NetBSD/src/blob/0bff031265b50be8e8b7719aed82212928d6c1df/sys/sys/termios.h
 musl: /usr/x86_64-linux-musl/include/bits/termios.h (identical to Linux-x86_64)
 linux: /usr/include/bits/termios.h
 OpenBSD: https://github.com/openbsd/src/blob/5271000b44abe23907b73bbb3aa38ddf4a0bce08/sys/sys/termios.h
 DragonFlyBSD:
   * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/_termios.h
   * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/termios.h
 Android: Just use the same as Linux
 uclibc: skipped
 haiku-os: http://cgit.haiku-os.org/haiku/tree/headers/posix/termios.h
 mac: /usr/include/sys/termios.h and /usr/include/sys/_types/_posix_vdisable.h
 solaris: skipped
 bitrig (follows openbsd): https://github.com/bitrig/bitrig/blob/d31f5220a98fae4e74abafe27c8d150843cc8105/sys/sys/termios.h
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
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

2 participants