Commit e7ed2c1c authored by Euan游根明's avatar Euan游根明

perf: 日志

parent 6fb7dac8
...@@ -210,7 +210,7 @@ class Nacos ...@@ -210,7 +210,7 @@ class Nacos
* @return mixed|string * @return mixed|string
*/ */
public static function NacosGet($key){ public static function NacosGet($key){
$path =self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP'])); $path =self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP'])).self::$configs['APP_ENV'];
$data = json_decode( $data = json_decode(
file_get_contents($path), file_get_contents($path),
true, true,
...@@ -228,7 +228,7 @@ class Nacos ...@@ -228,7 +228,7 @@ class Nacos
* @return void * @return void
*/ */
public static function NacosPut($key,$value){ public static function NacosPut($key,$value){
$path = self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP'])); $path = self::getPath(sys_get_temp_dir(), '/nacos.cache-'.md5(self::$configs['GROUP'])).self::$configs['APP_ENV'];
$data = json_decode( $data = json_decode(
file_get_contents($path), file_get_contents($path),
true, true,
...@@ -295,7 +295,7 @@ class Nacos ...@@ -295,7 +295,7 @@ class Nacos
* @return void * @return void
*/ */
public static function writeLog($logData){ public static function writeLog($logData){
$logFile = '/nacos-'.date('Y-m-d').'.log'; $logFile = '/nacos-'.self::$configs['GROUP'].'-'.date('Y-m-d').'.log';
$path = self::getPath(sys_get_temp_dir(),$logFile); $path = self::getPath(sys_get_temp_dir(),$logFile);
$data = json_decode( $data = json_decode(
file_get_contents($path), file_get_contents($path),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment