| 
									
										
										
										
											2017-06-16 10:33:35 +02:00
										 |  |  | package notify | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"github.com/genofire/logmania/lib" | 
					
						
							| 
									
										
										
										
											2017-08-09 08:45:45 +02:00
										 |  |  | 	"github.com/genofire/logmania/log" | 
					
						
							| 
									
										
										
										
											2017-06-16 10:33:35 +02:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var NotifyRegister []NotifyInit | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Notifier interface { | 
					
						
							| 
									
										
										
										
											2017-08-09 08:45:45 +02:00
										 |  |  | 	Send(entry *log.Entry) | 
					
						
							| 
									
										
										
										
											2017-06-16 10:33:35 +02:00
										 |  |  | 	Close() | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type NotifyInit func(*lib.NotifyConfig) Notifier | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func AddNotifier(n NotifyInit) { | 
					
						
							|  |  |  | 	NotifyRegister = append(NotifyRegister, n) | 
					
						
							|  |  |  | } |