| 
									
										
										
										
											2014-04-26 09:18:56 +00:00
										 |  |  | package DeviceConsole | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-19 17:19:11 +00:00
										 |  |  | import ( | 
					
						
							|  |  |  | 	"fmt" | 
					
						
							|  |  |  | 	"github.com/SommerEngineering/Ocean/Log/Meta" | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2014-04-26 09:18:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-17 15:44:52 +00:00
										 |  |  | // The logging device.
 | 
					
						
							| 
									
										
										
										
											2014-04-26 09:18:56 +00:00
										 |  |  | type Console struct { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-17 15:44:52 +00:00
										 |  |  | // This function is the interface between the logging system and the console logger.
 | 
					
						
							| 
									
										
										
										
											2014-04-26 09:18:56 +00:00
										 |  |  | func (dev Console) Log(entries []Meta.Entry) { | 
					
						
							|  |  |  | 	for _, entry := range entries { | 
					
						
							|  |  |  | 		fmt.Println(entry.Format()) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func (dev Console) Flush() { | 
					
						
							|  |  |  | 	// This is not necessary for a console logger
 | 
					
						
							|  |  |  | } |