This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Logfile


Logfile

Postby yucani » Jul 12, 2010 @ 2:22pm

Hello,

short question, is it possible to redirect the output of the logfile to another destination?
Instead of <appdir>.logfile.txt to c:\temp\log.txt ?

congratulations for vice world champs.
User avatar
yucani
pm Member
 
Posts: 29
Joined: Jan 11, 2008 @ 11:19am


Re: Logfile

Postby edge » Jul 28, 2010 @ 11:09am

Hi Yucani,

If you want to write a log file to a different location, we recommend implementing your own logging functionality.

Here is a small sample:
Code: Select all









10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
void logtext(const char *text, bool newline = true)
{
    bool opened;
    ClassEFile ef;
    opened = ef.Open("yourpath/log.txt");
    if (!opened)
        opened = ef.New("yourpath/log.txt");
    if (opened)
    {
        ef.Seek(ef.Size());
        ef.Write(text, ClassEStd::StrLen(text));
        if (newline)
        {
            char newlinestr[] = "\r\n";
            ef.Write(newlinestr, 2);
        }
        ef.Close();
    }
}
19 lines; 10 keywds; 1 nums; 59 ops; 3 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Re: Logfile

Postby yucani » Aug 6, 2010 @ 10:36am

thx
User avatar
yucani
pm Member
 
Posts: 29
Joined: Jan 11, 2008 @ 11:19am


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron