mirror of
				https://github.com/musix-org/musix-oss
				synced 2025-11-04 12:59:31 +00:00 
			
		
		
		
	make sure logs have arguments
This commit is contained in:
		
							
								
								
									
										4
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								index.js
									
									
									
									
									
								
							@@ -28,11 +28,11 @@ const oldConsole = {};
 | 
			
		||||
oldConsole.log = console.log;
 | 
			
		||||
console.log = function (arg) {
 | 
			
		||||
  oldConsole.log(arg);
 | 
			
		||||
  if (!config.devMode) webhookClient.send(arg);
 | 
			
		||||
  if (!config.devMode && arg) webhookClient.send(arg);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
oldConsole.error = console.error;
 | 
			
		||||
console.error = function (arg) {
 | 
			
		||||
  oldConsole.error(arg);
 | 
			
		||||
  if (!client.config.devMode) webhookClient.send(arg);
 | 
			
		||||
  if (!client.devMode && arg) webhookClient.send(arg);
 | 
			
		||||
};
 | 
			
		||||
@@ -7,11 +7,11 @@ const oldConsole = {};
 | 
			
		||||
oldConsole.log = console.log;
 | 
			
		||||
console.log = function (arg) {
 | 
			
		||||
  oldConsole.log(arg);
 | 
			
		||||
  if (!client.config.devMode) webhookClient.send(arg);
 | 
			
		||||
  if (!client.config.devMode && arg) webhookClient.send(arg);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
oldConsole.error = console.error;
 | 
			
		||||
console.error = function (arg) {
 | 
			
		||||
  oldConsole.error(arg);
 | 
			
		||||
  if (!client.config.devMode) webhookClient.send(arg);
 | 
			
		||||
  if (!client.config.devMode && arg) webhookClient.send(arg);
 | 
			
		||||
};
 | 
			
		||||
		Reference in New Issue
	
	Block a user