1. #1
    Mechagnome holyforce's Avatar
    Join Date
    Jun 2010
    Location
    Some where in the bowels of new jersey
    Posts
    688

    [Programming concept] LWLW

    So I came up with an idea. its called "Light weight Log Writer". I'm programming it in java and will be cross platform for Mac, Linux, and Windows. The idea is to have a powerful-light-weight-event-logger. Its modular, thus making it easier to debug. So far I have written my Exception classes. My Configuration information and classes...ect!

    I plan to make it read a .properties file. Inside the properties file will contain all the data for the event logger, such as directory, file name, time stamps, maximum file size, all that jazz.

    I am concerned though, I don't want an anti-malware to think its a keylogger. LWLW does not log keys, only events that it is given when added to the end users program for example: program A1 uses LWLW to write server connections/disconnections to a text file.

    I have a question for you guys though, what are the directorys on mac that are safe to write to? Also could you give an example?
    doh my god....

  2. #2
    "Safe to write to" is anything the user has read/write access. Where are you supposed to do your work? That's a harder question. For disposable stuff Cocoa defines NSTemporaryDir (or NSTemporaryDirectory, I can't remember which) that'll give you a handle to a place you can do temp work.

    Typically applications are expected to dump logs or caches into ~/Library for user-level tools and /library for system level tools. In both cases you're supposed to create a path for your company and then application. ~library/application support/<company>/<application> is also an acceptable path, ~library/<company>/<application> is generally okay but less good.

    There are also standard log and cache directories in library: ~library/log/<application>.log and ~/library/cache/<applicationidentier>/.

    Finally command line or daemons that target the BSD subsystem typically use /tmp which on a mac is a symlink to /private/tmp. Java on a mac is a big pile of hurt: I'd advise against it. Given that macs (and most linux/bsd distributions) have all settled on syslogd and libc I'm not sure there's much of a hole for you to fill on those platforms.
    Last edited by evn; 2013-02-19 at 06:34 PM.
    A new UI series for 5.2Steal my old UILearn about WeakAuras • Nobody to raid with right now so no PVE videos.

  3. #3
    Quote Originally Posted by holyforce View Post
    I am concerned though, I don't want an anti-malware to think its a keylogger. LWLW does not log keys, only events that it is given when added to the end users program for example: program A1 uses LWLW to write server connections/disconnections to a text file.
    Malware scanners work by comparing a hash of user files to a known database of hashed virus files and/or flagging activity from programs digitally signed by unknown hosts. Either way, your program is more of a library than an actual program.

    Quote Originally Posted by holyforce View Post
    I have a question for you guys though, what are the directorys on mac that are safe to write to? Also could you give an example?
    The end user should be specifying the directory in the .properties file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •