Closed GoogleCodeExporter closed 9 years ago
sorry, the type of the case should be "Enhancement" or "Other".
Original comment by radiu...@gmail.com
on 17 Jan 2014 at 5:02
I'm thinking if it's OK to add a column into syslog.fields_classes_map table.
I'm just call it "field_display_name", actually it is
"in_class_field_display_name". this way we can reuse existing field for
different class. also more accurate to each type of logs.
for example there have existing field "server".
now have a network access server(NAS), sure we can add a new fields call NAS,
but if we can reuse existing field "server" will keep the table short, and easy
to maintain. (not sure if this will effect performance)
+-------------+----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+----------------------+------+-----+---------+-------+
| field_id | smallint(5) unsigned | NO | PRI | NULL | |
| class_id | smallint(5) unsigned | NO | PRI | NULL | |
| field_order | tinyint(3) unsigned | NO | | 0 | |
| field_display_name| varchar(255) | NO | | 0 | |
Original comment by radiu...@gmail.com
on 17 Jan 2014 at 5:22
You can add your own fields and they will not get overwritten during an
upgrade. I recommend storing them in a separate, local SQL file which can be
run like mysql -uroot syslog -e "source myfile.sql" You only need to put any
fields which don't already exist in that file, as well as classes and the
mapping. It could look like:
INSERT IGNORE INTO fields (field, field_type, pattern_type) VALUES ("myfield",
"string", "QSTRING");
INSERT IGNORE INTO classes (class) VALUES ("myclass");
INSERT IGNORE INTO fields_classes_map (field_id, class_id, field_order) ...
The field_display_name column you propose is the same as changing which field
is being referred to by the field_id, and any edits to fields_classes_map carry
the same risk of conflict with the upstream as editing the fields table.
Original comment by mchol...@gmail.com
on 18 Jan 2014 at 10:02
Original issue reported on code.google.com by
radiu...@gmail.com
on 17 Jan 2014 at 2:26