Where can Strapi print log when I Create/Update/Delete via administration panel

System Information
  • Strapi Version: v3.6.2
  • Operating System: macOS 12.4
  • Database: MongoDB
  • Node Version: v14.19.0
  • NPM Version: 6.14.16
  • Yarn Version: 1.22.19

I need record user actions from administration panel and append detail message into below log,

[2022-08-30T16:18:46.096Z] debug PUT /content-manager/collection-types/application::asset.asset/630e024ee67623d14cccxxxx (81 ms) 200

I searched file under node_modules, now I know I can modify the update function from
/strapi-plugin-content-manager/controllers/collection-types.js to get user action like this

async update(ctx) {
    const { userAbility, user } = ctx.state;
    const { id, model } = ctx.params;
    const { body } = ctx.request;
      
    **console.log("*** Update body: ", body);**
    ...
  

But I still not find out code of Strapi log, May I know which file I can modify to archive requirement?

Hey @techgeniuswang , Did you find the answer for this?

Hey @Aastha_Talwaria
you may follow this :slight_smile:

1 Like