diff --git a/manage-view/src/components/ListLog/ListLog.jsx b/manage-view/src/components/ListLog/ListLog.jsx index 7e70f23..6720695 100644 --- a/manage-view/src/components/ListLog/ListLog.jsx +++ b/manage-view/src/components/ListLog/ListLog.jsx @@ -21,7 +21,7 @@ const ListLog = () => { const findValueInLog = async () =>{ try { - const res = await axios.post(findValue,{value: value}); + const res = await axios.post(findValue,{value: valueSearch}); setValue(res.data) } catch (error) { diff --git a/start/routes.ts b/start/routes.ts index 11d4529..ae423bc 100644 --- a/start/routes.ts +++ b/start/routes.ts @@ -183,9 +183,9 @@ Route.post("/api/find-value", async ({ request, response }) => { const { value } = request.all(); console.log(value) - const { stdout, stderr } = await exec(`grep -nr "${value}" /home/logs`); + const { stdout, stderr } = await exec(`grep -nr "${value}" /home/logs`,{maxBuffer: 1024 * 500}); - + // response.status(200).send("sdjkghs"); response.status(200).send(JSON.stringify(stdout)); } catch (error) { console.error(error);