Logging to a custom file
Hi everybody,
i have the following situation: when you log in through the terminal as root, you get a question if you want to apply the proxyconfiguration or not. I have done this by changing the .bash_profile of the root-user: Code:
# .bash_profile Code:
/var/log/proxylogger.log { Code:
# Opslaan van berichten i.v.m. de proxyinstellingen bij het inloggen als root. What am I doing wrong? I'm only into Linux for a few weeks (following a course) |
If you defined the LOCAL5 facility (and restarted rsyslogd) then shouldn't you be using 'logger -p local5.info "message";' instead of "-f"?
|
Quote:
I've been searching 3 days for this but I just couldn't find the solution. And now that I see it, it seems so easy and logic to. The problem was that I didn't knew how to use the facility in a correct way together with the logger-command. unSpawn, you just made my day :cool: |
Quote:
While Linux has a somewhat undeserved reputation for its terse and cryptic manuals they do provide you with a lot of nfo as long as you're willing to read (and read and read) and know how and where to find it (as in: 'which logger', 'whatis logger', 'locate logger', 'apropos logger', 'grep -r /usr/share/doc -ie n/logger', 'man logger' or search LQ). Your distribution (do fill in your details in your LQ user control panel) might provide basic information and then there's generic tutorials abound like Rute you might find interesting. Same goes for scripting: search LQ and you'll find a cornucopia of scripts (or see Heiner's SHELLdorado). BTW, I forgot to mention that wrt the original topic: it's customary to treat the root account as a non-human account only for admin purposes. As such, I mean if you don't have any compelling reasons for requiring proxy variables to be set this way, you best leave the root shell environment as "clean" as possible. If you do change things do make backups so you have something to revert back to in case of a SNAFU. |
All times are GMT -5. The time now is 11:19 PM. |