Can i overwrite existing keyword method?i.e if i create same keyword in custom method, which will be executed?

i want to overwrite an existing keyword in custom keyword.

For example:

I am creating custom keyword: acceptAlert

which is already in Built-in keyword. My question is which one will be executed? or I cant create with the same name?

Suppose if I cant create with same name how can i overwrite built in method?

No you can’t overwrite existing keyword method. If you need to add external logs statement, then you can use methods from KeywordUtil class, e.g:

import com.kms.katalon.core.util.KeywordUtil

KeywordUtil.logInfo('Your INFO logs')

Is ther any way so that i can overwrite the existing keyword method?

I need to add a External log statement for each step

You can create custom keywords which are the same with current built-in keywords. When you call it, it will execute that custom keyword, not the built-in keyword even they have the same name.