1

When my game is running, I get all my normal io:format output, but infuriatingly, every output is preceded by the prompt:

(server@gamehost.thisplace.net)1> log entry 1
(server@gamehost.thisplace.net)1> log entry 2
(server@gamehost.thisplace.net)1> log entry 3
(server@gamehost.thisplace.net)1> log entry 4
(server@gamehost.thisplace.net)1> log entry 5
(server@gamehost.thisplace.net)1> log entry 6
(server@gamehost.thisplace.net)1> log entry 7
(server@gamehost.thisplace.net)1> log entry 8
(server@gamehost.thisplace.net)1> log entry 9
(server@gamehost.thisplace.net)1> log entry 10

The desired result is:

log entry 1
log entry 2
log entry 3
....

I'm still on R14A, but will move up before too long. If there's no quick and easy way to do it in my current version, what's the fast way to remove this annoyance in R15 and company?

Thanks

Sniggerfardimungus
  • 11,583
  • 10
  • 52
  • 97
  • what do you want to remove? node name and line number? i see line number is the same in every line..is this the full result in shell? – user601836 May 07 '12 at 20:16

2 Answers2

2

try passing -noshell to erl when starting it. This will of course mean that you will have no shell.

Lukas
  • 5,182
  • 26
  • 17
1

in erlang shell you can't remove line numbers. Maybe you may want to use file log with:

note that error_logger should do what you asked also in shell since the output will be similar to:

2> error_logger:warning_msg("Warnings tagged as: ~p~n", [warning]).
=ERROR REPORT==== 11-Aug-2005::13:45:49 ===
Serious error in my module
ok

more here: Logging libraries for Erlang/OTP

Community
  • 1
  • 1
user601836
  • 3,215
  • 4
  • 38
  • 48