Toparvion / analog

🔎 Flexible web-based real-time log viewer
MIT License
19 stars 5 forks source link

Incorrect log config entry selection #12

Closed Toparvion closed 5 years ago

Toparvion commented 6 years ago

Sometimes AnaLog may show composite log that is different from the actually chosen one. For instance, if two separate log config entries are described as:

# one
  - group: ARYA
    pathBase: /pub/home/upc/applications/upc2arya/src/projects/
    compositeLogs:
      - node: north
        path: webfront-api/logs01/webfront-api-all.log
        timestamp: yy.MM.dd HH:mm:ss.SSS
# another
  - group: SNOW
    pathBase: /pub/home/upc/applications/upc2snow/src/projects/
    compositeLogs:
      - node: north
        path: webfront-api/logs01/webfront-api-all.log
        timestamp: yy.MM.dd HH:mm:ss.SSS

then the first one can be chosen instead of second.

The reason is unsufficient data for calculating uid value. At the moment, it takes 6 parameters: path, node, title, selected, timestamp, includes, where path is the entry's own path only, not including group's pathBase. As a result, two different log config entries may evaluate to the same uid if the only difference between them is in the pathBase.

Toparvion commented 5 years ago

The issue was fixed within the scope of agent logic refactoring. It involved some major changes in building the tailing and sending integration flows. By now the logic on agent side looks like:

analog-12