README.md in oh_my_log-1.0.2 vs README.md in oh_my_log-1.0.3
- old
+ new
@@ -83,34 +83,38 @@
>[read only] ips Hash(the key is the rule: ONLY/EXCEPT/ALL the value is an array of ips)
>[read only] status_codes Hash(the key is the rule: ONLY/EXCEPT/ALL the value is an array of status codes)
+>[read only] methods Hash(the key is the rule: ONLY/EXCEPT/ALL the value is an array of methods)
+
###### Instance methods:
>set_controllers (controller ->Hash{string =>string[]})
>set_actions (actions ->Hash{string =>string[]})
>set_ips (ips ->Hash{string =>string[]})
>set_status_codes (status_codes ->Hash{string =>Range[]})
+>set_methods (methods ->Hash{string =>string[]})
+
###### Class methods:
->universal_for(action: {"ALL" =>[]}, controllers: {"ALL" =>[]}) (inside the hash only or
-except you can put an array of actions)
+>universal_for(action: {"ALL" =>[]}, controllers: {"ALL" =>[]}, methods: {"ALL" =>[]})
Complex initializer example:
```sh
OhMyLog::Log.configure do |config|
config.print_log = true
selector = OhMyLog::Log::Selector.new
selector.set_controllers("EXCEPT" =>["ApplicationController"])
selector.set_actions("ONLY" =>["index","create","destroy"])
selector.set_status_codes("ONLY" =>[(0..200)])
+ selector.set_methods("EXCEPT" =>["GET"])
selector.set_ips("EXCEPT"=>["192.168.0.1"])
config.add_selector(selector)
#put your configs here
end
```
@@ -172,9 +176,33 @@
>receiver Model (instance of the model that got affected by the action)
>changes string (changes that this model had before and after the action)
---
+
+#### OhMyLog::SyslogConfiguration
+
+###### Class methods:
+
+>[read only] processor_name string (the name of the processor in use)
+
+>[read only] operation string/symbol (the operation to execute when the message is bigger that 1024 byte)
+
+>use (processor_name, operation) (the name of the processor and the operation to apply)
+
+>change_processor(processor_name)
+
+>change_operation(operation) (supported operations are: split and trim)
+---
+
+ ### How to configure a syslog ready log:
+ * Include this in the config proc of the initializer:
+
+ ```sh
+ OhMyLog::SyslogConfiguration.use("RFC3164")
+ syslog = OhMyLog::SyslogImplementor.new(hostname: "Staging", priority: 101, tag: "HELLO", program_name: "WORLD")
+ config.syslog = syslog
+ ```
### Development
Developed by Fabrizio Spadaro
\ No newline at end of file