EventLOG, ErrorIDs, Shared-Memory-File-System

This is a discussion on EventLOG, ErrorIDs, Shared-Memory-File-System within the Linux Programming forums, part of the Platform Specific Boards category; Dear Linux-friends, I'm new here and haven't until now no Linux used and also don't programming under Linux. I have ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Lightbulb EventLOG, ErrorIDs, Shared-Memory-File-System

    Dear Linux-friends,

    I'm new here and haven't until now no Linux used and also don't programming under Linux. I have in the last 10 years worked in a company in germany as programmer under Windows. Now I'm without a job, so the background of this topic isn't commercial. My english is bad. I know. I have written this text with a dictionary. In the last year, I worked in the company, I realized, what here missing: a not improvised event-log.
    In the last three years is my concept for this function continueal grown and than I ask my, whether this function must be include to the operating-system. The destination is: one output-address for a programm equally to the time before GUIs grow up. Before the GUIs grow up, all output go to the console and this output can optional redirect in a file. By growing up the GUIs now programms, which worked in batch and interactiv, have more than one output-address: console, log-file, variabels for GUI-messages and so on. In my old company exists for some programms six output-addresses.

    My solution is the following:
    I implements a shared-memory-file-system, where for the user exists no way to edit. This file-system is for programms only and is only in main-memory. So I can use binary characters in the path from this file-system. This file-system includes only data, which have yet again no backup-relevance. Events are in this file-system files/foliage and the objects machine, material, oder and so on are directories. The filename is the errorid. In this file-system exists than an special filetyp: event. In a healthy company with an existing application-framework this file-system than represents the programm-external side from the software-system. In this file-system have any thread his own current-dir, where he stay now. The programm must navigate in this file-system corresponding his current data with relative/absolute jumps.

    The errorid includes in my solution following informations:
    • Typ from the ID: over this field shall other typs of IDs implementable: TextIDs, CommandIDs, ProertyIDs, LicenceIDs and so on
    • Event-Typ: Error, Warning, Information
    • Code-System: a ID, to allow the integration of different code-systems from other companies. In the company, where I have worked, I used primary five libraries:
      MFC Microsoft ErrorIDs > 0
      Windows-SDK Microsoft ErrorIDs > 0
      ODBC Microsoft ErrorIDs > 0
      C-Runtime Microsoft ErrorIDs < 0
      List&Labels Combit ErrorIDs < 0
      The errorid-systems from each library are simple integer-values (1, 2, and so on). So I must handle the errorids from each library separate. And to display the text for the errorid to the user, I must call different functions from each library, because every library has here own function. Additional I see in all this errorcode-systems, that they only use a minor count of bits of the available 32 Bit. So I ask my, why we not use the full 32 Bit.
    • Sign: the sign of the errorid; only
    • ModuleID: the ID from the module (DLL or shared-library, EXE); the ID is 1-based
    • ClassID: the ID from the class; 1-based
    • ID: the ID in the class; 1-based


    Depends on the implementation of a code-system the last three fields can combined to a simple ID. In this case the ID is always positiv. The sign is saved in the Sign-field. This three fields should only make the programming more easy. Because for the errorid are only 32 Bit available, this fields was implemented in C as bit-fields.

    In my concept I have implemented a universal ID-class, from which I have done some derivatives:
    The following classes I have derivate from this universal ID-class:
    EventID, TextID, ProertyID, LicenceID, CommandID, ParameterID

    The IDs create I over inline-functions. So the compiler optimize this to a simple static 32 Bit-Value and the runtime isn't negativ affected.

    To integrate this file-system in the operating-system, the following modifications are required:
    The Code-System field in the errorid must split to the following fields:
    • CountryID: ID for the country; I don't, these already exists simular to the shortcut de in a internet-address www.web.de
    • CompanyID/SystemID: Now I think, it doesn't exists any simular ID. This ID must than be administrated. To allow private programmers without a ID to use this function, some IDs must be reserved for dynamic allocation.


    To implement this errorids they must grow up from 32 Bit to 64 Bit. And the static tables, over which the system is allowed to get the text from an errorid, must install while the installation of a software-system.
    In Windows I think, this static tables must be linked in a DLL of the software-system as a resource.

    The destination of this concept is, to exclude the frustate message from the form of: „Error 0x334343“. The matter, that a programm have all needed informations, but don't give them the user, must be also exclude. The reason from this is in my mind, that the correct output from all needed informations is a lot of work, that only for often events is repayed. This problem must solve basically.
    Another problem is, that the user needs some informations, which only available in superior functions. This problem I whant to solve with the directory-three, that organize the files.
    Last edited by j.ody; 04-02-2011 at 08:49 AM. Reason: I had forgotten somethink

  2. #2
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Unhappy Please do an reply

    If anybody had read this thread, please do an reply. After four days without an reply I think, nobody read it. In the other threads exists replies after one day.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you help me about tolower() in file
    By nctar in forum C Programming
    Replies: 7
    Last Post: 05-12-2010, 10:04 AM
  2. Memory Fragmentation with Dynamic FIFO Queue
    By fguy817817 in forum Linux Programming
    Replies: 17
    Last Post: 10-31-2009, 04:17 AM
  3. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 04:02 AM
  4. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  5. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21